<?php $this->load->view('layout/header');?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">商品管理</a></li>
            <li class="active"><a href="<?php echo site_url('tourismkeyword/grid')?>">搜索推荐</a></li>
        </ul>
        <div class="product-view-area">
            <p>搜索推荐</p>
            <a href="<?php echo site_url('tourismkeyword/add')?>">添加关键词</a>
        </div>
        <?php echo execute_alert_message();?>
        <div class="order-search">
            <form method="get" action="<?php echo site_url('tourismkeyword/grid')?>" class="form-horizontal">
                <div class="row">
                    <div class="col-lg-4">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">关键词</label>
                            <div class="col-xs-7">
                                <input type="text" name="keyword" value="<?php echo trim($this->input->get('keyword'));?>" class="form-control" placeholder="请输入关键词">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row search-button">
                    <div class="col-lg-5">
                        <div class="form-group">
                            <label class="col-sm-4 control-label"> </label>
                            <div class="col-xs-7">
                                <button type="submit" class="btn btn-warning">搜索</button>
                                <a href="<?php echo site_url('tourismkeyword/grid');?>" class="btn btn-default">重置条件</a>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="tourism-product-list">
            <div class="order-dan clearfix">
                <ul class="order-httList">
                    <li class="active">
                        <a href="<?php echo site_url('tourismkeyword/grid');?>">全部</a>
                    </li>
                </ul>
            </div>
            <?php if ( $page_list->num_rows() > 0 ):?>
                <table class="table">
                    <thead>
                        <tr>
                            <th>关键词</th>
                            <th>排序</th>
                            <th>状态</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php foreach( $page_list->result() as $item ):?>
                        <tr>
                            <td><?php echo $item->keyword;?></td>
                            <td><?php echo $item->sort;?></td>
                            <td><?php echo $status[$item->status]?></td>
                            <td><?php echo $item->create_time;?></td>
                            <td class="operate-list">
                                <p>
                                    <a class="btn btn-default btn-xs" href="<?php echo site_url('tourismkeyword/edit/'.$item->id)?>">编辑</a>
                                    <a class="btn btn-danger btn-xs" href="<?php echo site_url('tourismkeyword/delete/'.$item->id)?>" onclick="return confirm('确定删除吗')">删除</a>
                                </p>
                            </td>
                        </tr>
                    <?php endforeach ;?>
                    </tbody>
                </table>
                <div class="your-page pagination pagination-right"><?php echo $pg_link;?></div>
            <?php else: ?>
                <div class="none-data">暂无数据</div>
            <?php endif;?>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>